class Parent:
    parentAttr = 100
    __testPrivate = 100
    def __init__(self):
        print("调用父类的构造函数")
    def parentMethod(self):
        print("调用父类方法")
    def setAttr(self, attr):
        Parent.parentAttr = 100
    def getAttr(self):
        print("父类属性：", Parent.parentAttr)
    def myMethod(self):
        print("Parent myMethod")
class Child(Parent):
    def __init__(self):
        print("调用子类构造方法")
    def childMethod(self):
        print("调用子类方法")
    def myMethod(self):
        print("Child myMethod")
c = Child()
c.childMethod()
c.parentMethod()
c.setAttr(200)
c.getAttr()
c.myMethod()
p = Parent();